Show:

Q timestamp Class

Makes a timestamp which is periodically updated. Initially shows time offsets in ' ago' manner. Later represents time depending on format, wisely excluding unnecessary detais (i.e. 'year' if timestamp has been made this year, 'year' and 'month if in this month etc).

Constructor

Q timestamp

(
  • $options
)

Parameters:

  • $options Array

    Options for the tool

    • [time=time()] Integer optional

      Unix timestamp (in seconds), defaults to value of time() call.

    • [format] String optional

      formatting string which makes specific timestamp representation. Can contain placeholders supported by strftime() and also few special placeholders with specific functionality.

Item Index